WPF and Silverlight Edition Basic Library > Menu and ContextMenu > Menu and ContextMenu Features > Automatic Closing |
By default, the C1ContextMenu control, its submenus, and the submenus of a C1Menu control will remain open even when a user clicks outside of the menu. The only way users can close the menu is if they click the C1Menu control or the C1ContextMenu control. However, you can change this behavior by enabling the automatic closing feature, which will allow users to close menus by clicking outside of the menu control's boundaries. To turn on automatic closing, set the AutoClose property to True.
To enable automatic closing, use one of the following methods:
Complete the following steps:
Complete the following steps:
Visual Basic Copy Code C1Menu1.AutoClose = True
C# Copy CodeC1Menu1.AutoClose = true;
Complete the following steps:
The control's properties will appear in the Properties window.